Apart from the location of defects and the determination of their size, it is often important in stray-flux testing to determine the position of the defects relative to the test piece surface. Generally, past known methods made use of the fact that signals derived from defects located at different positions relative to the test piece surface, i.e., the signals derived from exterior and interior defects of pipes, exhibit different frequency spectrums. So the frequency characteristics of the signal of an exterior defect are for instance considerably higher than those of an interior defect. According to a known method described in U.S. Pat. No. 4,117,403, the stray-flux signals obtained when scanning a pipe with a stray flux probe are split up into two channels, one including all signals, whether derived from exterior or from interior defects, while the other channel discriminates between signals according to their different frequency ranges, using for instance, a high-pass. The signals of the two channels are stored temporarily, and the amplitudes of the stored signals are used to discern between interior or exterior defects. This may be accomplished, for example, by forming the quotients of the signals of the two channels after having adjusted the amplification of the two channels in a manner such that an exterior defect will cause the two channels to supply signals of the same amplitude, i.e., give a quotient "1" while an interior defect which as a result of its lower frequency range is attenuated in the high-pass giving a smaller quotient clearly discernible from "1". Although in practice this procedure has proven satisfactory in many cases, it has been found disadvantageous that apart from the necessary mutual adaptation of the two channels, every new test requires a readjustment of the frequency-dependent element in the second channel which as a rule consists of a high-pass. This adjustment is difficult and requires an excessive amount of time for accomplishment, even though the operator may be experienced.